package com.atguigu.spring5.testdemo;/*
@author joker
@create 2022-03-16 17:41
untitled
*/

import com.atguigu.spring5.bean.Emp;
import com.atguigu.spring5.service.userService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class testOuterBean {
    @Test
    public void testAdd() {
        ApplicationContext context = new ClassPathXmlApplicationContext("bean1.xml");
        userService aa = context.getBean("userService", userService.class);
        aa.add();
    }

    @Test
    public void testBean3(){
        ApplicationContext context = new ClassPathXmlApplicationContext("bean3.xml");
        Emp e = context.getBean("emp",Emp.class);
        e.add();
    }
    @Test
    public void testBean4(){
        ApplicationContext context = new ClassPathXmlApplicationContext("bean4.xml");
        Emp e = context.getBean("emp",Emp.class);
        e.add();
    }
}
